<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<script src="js/template.js" type="text/javascript" charset="utf-8"></script>
	
	<!--在模板中可以调用自定义方法-->
	<script id="test" type="text/html">  
		{{fontcolor(mm)}}  
	</script>  
	
	<body>
		<div id="container">
			
		</div>
	</body>
	<script type="text/javascript">
		//自定义了一个方法
		template.helper("fontcolor",function(text){
			
			return text+"==***==";
		});
		
		var data = {
			mm: undefined
		}
		var html = template("test",data);
		document.querySelector("#container").innerHTML = html;
	</script>
</html>
